<template>
  <div>
    <!-- 人气推荐 -->
    <section>
      <div class="renqituijina">
        <div class="container">
          <div class="good-title">
            <div class="title-left">
              <h1>人气推荐</h1>
              <span>人气爆款 不容错过</span>
            </div>
            <div class="title-right"><a href="">查看全部 ></a></div>
          </div>
          <div class="good-list">
            <ul>
              <li v-for="recommend in recommend" :key="recommend.id">
                <img :src="recommend.picture" alt="" />
                <div class="good-desc">
                  <span>{{ recommend.title }}</span>
                  <p class="renqi">{{ recommend.alt }}</p>
                </div>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </section>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  mounted() {
    this.$store.dispatch("getRecommend");
  },
  computed: {
    ...mapState({
      recommend: (state) => state.home.recommend,
    }),
  },
};
</script>

<style>
.renqituijina {
  height: 541px;
}
.renqituijina .good-list ul li {
  background-color: #ffffff;
}
</style>